﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.PurchaseAndSales.Comain.Migrations
{
    public partial class update_sheepsales : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "IndustryName",
                table: "VendorModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: false,
                oldClrType: typeof(bool),
                oldType: "bit",
                oldMaxLength: 50);

            migrationBuilder.AddColumn<long>(
                name: "VenDorCode",
                table: "VendorModels",
                type: "bigint",
                nullable: false,
                defaultValue: 0L);

            migrationBuilder.AlterColumn<string>(
                name: "ParentEITag",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50);

            migrationBuilder.AlterColumn<string>(
                name: "MotherEITag",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50);

            migrationBuilder.AlterColumn<string>(
                name: "CreateBy",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50);

            migrationBuilder.AlterColumn<string>(
                name: "ColumnName",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50);

            migrationBuilder.AlterColumn<string>(
                name: "BuildingName",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50);

            migrationBuilder.AddColumn<string>(
                name: "Address",
                table: "SheepSaleModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "CheckDate",
                table: "SheepSaleModels",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CheckPeople",
                table: "SheepSaleModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CheckState",
                table: "SheepSaleModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CustomerInformationId",
                table: "SheepSaleModels",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "DocId",
                table: "SheepSaleModels",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "DocNumber",
                table: "SheepSaleModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "MoneyCheckDate",
                table: "SheepSaleModels",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "MoneyCheckPeople",
                table: "SheepSaleModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "SaleId",
                table: "SheepSaleModels",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "WorkShopCheckDate",
                table: "SheepSaleModels",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "WorkShopCheckPeople",
                table: "SheepSaleModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "WorkShopId",
                table: "SheepSaleModels",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AlterColumn<string>(
                name: "VendorSnowId",
                table: "PurchaseFormModels",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "ColumnName",
                table: "PurchaseFormModels",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "VenDorCode",
                table: "VendorModels");

            migrationBuilder.DropColumn(
                name: "Address",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "CheckDate",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "CheckPeople",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "CheckState",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "CustomerInformationId",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "DocId",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "DocNumber",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "MoneyCheckDate",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "MoneyCheckPeople",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "SaleId",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "WorkShopCheckDate",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "WorkShopCheckPeople",
                table: "SheepSaleModels");

            migrationBuilder.DropColumn(
                name: "WorkShopId",
                table: "SheepSaleModels");

            migrationBuilder.AlterColumn<bool>(
                name: "IndustryName",
                table: "VendorModels",
                type: "bit",
                maxLength: 50,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50);

            migrationBuilder.AlterColumn<string>(
                name: "ParentEITag",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50,
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "MotherEITag",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50,
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "CreateBy",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50,
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "ColumnName",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50,
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "BuildingName",
                table: "SheepSaleModels",
                type: "nvarchar(50)",
                maxLength: 50,
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(50)",
                oldMaxLength: 50,
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "VendorSnowId",
                table: "PurchaseFormModels",
                type: "int",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "ColumnName",
                table: "PurchaseFormModels",
                type: "int",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);
        }
    }
}
